package org.ionyx.client.main.modules;

import org.ionyx.client.main.module.Module;
import org.ionyx.client.utils.Category;

public class Sprint extends Module{

	public Sprint() {
		super("Sprint", "", 0, 0xffffff, Category.MOVEMENT, true);
		
	}
	@Override
	public void onMotionUpdate(){
		if(canSprint()){
			getPlayer().setSprinting(true);
			
		}
	}
	
	public boolean canSprint(){
		return getMinecraft().gameSettings.keyBindForward.getIsKeyPressed() && getPlayer().getFoodStats().getFoodLevel() > 14 && !getPlayer().isOnLadder() && !getPlayer().handleLavaMovement() && !getPlayer().handleWaterMovement();
	}
	
}
